// Copyright (c) 2019 Presto Labs Pte. Ltd.
// Author: linchuan

#pragma once

#include <memory>

#include "coin2/exchange/base/symbology/product_info.h"
#include "coin2/exchange/kraken/symbology/product.h"

namespace coin2::exchange::kraken::symbology {

inline std::unique_ptr<base::symbology::IProductHolder> GetProductHolder(
    const KrakenProduct& product) {
  using base::symbology::ProductHolder;
  static const base::symbology::ProductInfoConstant kKrakenProductInfo(
      "data/coin2/product_info/Spot.Kraken.v1.json");
  auto pi_proto = kKrakenProductInfo.GetProductInfo(product.relative_norm());
  return std::make_unique<ProductHolder>(product, pi_proto);
}

}  // namespace coin2::exchange::kraken::symbology